<extend name="base"/>

<block name="extend">
<script language="javascript">
      $(document).ready(product_obj.product_order); 
</script>

</block>


<block name="body">

<div id="news" class="r_con_wrap">
		<!-- <div class="control_btn">
	 		<a href="{:U('merchant_add')}" class="btn_green btn_w_120">添加商家</a>    
		</div> -->
        <form class="r_con_search_form" id="search_form" action="{:U('Pintuan/index')}" method="post">
			时间：<input name="Time" value="{$time}" type="text" class="form_input" size="20" readonly="readonly">
			关键字：<input name="Keyword" value="{$keyword}" type="text" class="form_input" placeholder=" 订单号、昵称" size="15" >
			<input type="submit" class="search_btn" id="search_btn" value="搜索">
			<!-- <a href="{:U('Merchant/productExport')}"><input type="button" class="search_btn" id="export_btn" value="导出"></a> -->
		</form> 
        
        <table border="0" cellpadding="5" cellspacing="0" class="r_con_table">
            <thead>
                <tr>
                    <td width="5%" nowrap="nowrap">序号</td>
                    <td width="10%" nowrap="nowrap">订单号</td>
                    <td width="10%" nowrap="nowrap">呢称</td>
                    <td width="10%" nowrap="nowrap">商品名</td>
                    <td width="10%" nowrap="nowrap">封面图</td>
                    <td width="8%" nowrap="nowrap">单价(元)</td>
                    <td width="5%" nowrap="nowrap">购买数量</td>
                    <td width="5%" nowrap="nowrap">所在团编号</td>
                    <td width="10%" nowrap="nowrap">是否团长</td>
                    <td width="10%" nowrap="nowrap">支付状态</td>
                    <td width="10%" nowrap="nowrap">下单状态</td>
                    <td width="15%" nowrap="nowrap" class="last">操作</td>
                </tr>
            </thead>
            <tbody>
                <foreach name="orderarr" item="v" key="k">
                <tr >
                    <td nowrap="nowrap">{$k+1}</td>
                    <td nowrap="nowrap">{$v.ordernumber}</td>
                    <td nowrap="nowrap">{$v.nickname}</td>
                    <td nowrap="nowrap">{$v.productname}</td>
                    <td nowrap="nowrap"><img src="{$v.coverimg}" width="50"></td>
                    <td nowrap="nowrap">{$v.price}</td>
                    <td nowrap="nowrap">{$v.buynumber}</td>
                    
                    <td nowrap="nowrap">{$v.groupid}</td>
                    <td nowrap="nowrap"><if condition="$v.isleader eq 0">团员<else />团长</if></td>
                    <td nowrap="nowrap"><if condition="$v.ispay eq 0"><spna style="color:red;">未付款</spna><else />已付款</if></td>
                  	<td nowrap="nowrap">
                  		<if condition="$v.status eq 1">
                  			已下单
                  			<elseif condition="$v.status eq 2"/>
                  			已成团 
                  			<elseif condition="$v.status eq 3"/>
                  			已发货
                  			<elseif condition="$v.status eq 4"/>
                  			已完成 
                  			<elseif condition="$v.status eq 5"/>
                  			已取消 
                  			<elseif condition="$v.status eq 6"/>
                  			已申请退款 
                  			<elseif condition="$v.status eq 7"/>
                  			退款成功
                  			<else/>
                  			已过期
                  		</if>
                  	</td>
                   
                   
                    <td class="last" nowrap="nowrap">
                        <a href="{:U('index_detail',array('id'=>$v['id']))}"><img src="__PUBLIC__/Member/images/ico/view.gif" align="absmiddle" alt="查看"  title="查看"/></a>
                      
                        <if condition="$v.status eq 4"><a href="{:U('delete_order',array('id'=>$v['id']))}" title="删除" onClick="if(!confirm('删除后不可恢复，继续吗？')){return false};"><img src="__PUBLIC__/Member/images/ico/del.gif" align="absmiddle" /></a></if>
                    	<if condition="$v.status eq 7"><a href="{:U('delete_order',array('id'=>$v['id']))}" title="删除" onClick="if(!confirm('删除后不可恢复，继续吗？')){return false};"><img src="__PUBLIC__/Member/images/ico/del.gif" align="absmiddle" /></a></if>
                    </td>
                </tr>
                </foreach>
            </tbody>
        </table>
        <div class="blank20"></div>
        <div id="turn_page">{$page}</div>
    </div>  

    </block>